package com.example.jdai.jdai.util;

import android.content.Context;
import android.content.SharedPreferences;

import com.example.jdai.jdai.MyApplication;
import com.example.jdai.jdai.config.Config;

/**
 * Created by hellopyj on 2017/1/12.
 */

public class DataPhone extends BaseData{
    public static String PHONE="phone";
    //public static int STATUS=DataAll.WEIWS;
    public static String PHONE_NUM=PHONE+"_num";
    public static String PHONE_PWD=PHONE+"_pwd";
    public static String PHONE_CODE=PHONE+"_code";
    public DataPhone(){
        count=3;
        SharedPreferences sp= MyApplication.applicationContext.getSharedPreferences(Config.SP_NAME, Context.CONTEXT_RESTRICTED);
        data.put(PHONE_NUM,sp.getString(PHONE_NUM,""));
        data.put(PHONE_PWD,sp.getString(PHONE_PWD,""));
        data.put(PHONE_CODE,sp.getString(PHONE_CODE,""));
    }
    public boolean saveAll()
    {
        super.saveAll();
        return dataCheck();
    }
}
